package com.example.myapplication.filter;

import java.util.ArrayList;
import java.util.List;

public class ManCriteria implements Criteria {
    @Override
    public List<Person> meetCriteria(List<Person> people) {
        ArrayList<Person> list = new ArrayList<>();
        for (Person person : people) {
            if (person.getGender().equalsIgnoreCase("man") || person.getGender().equals("男")) {
                list.add(person);
            }
        }
        return list;
    }
}
